#!/usr/bin/python3
#Author : Gyl  
#当前系统日期 : 2019/2/1   
#当前系统时间 : 15:19   
#创建文件的IDE名称 : PyCharm

from flask import Flask,make_response

app= Flask(__name__)
app.config.from_object('config')
# print(app.config['DEBUG'])


@app.route('/book/search/<q>/<page>')
def search(q,page):
    """
        q:关键字
        page
    :return:
    """
    isbn_or_key = 'key'
    if len(q) ==13 and q.isdigit():
        isbn_or_key ='isbn'
        short_q = q.replace('-','')
    if '-' in q and len(short_q) ==10 and short_q.isdigit():
        isbn_or_key = 'isbn'
    pass


if __name__ == '__main__':
    app.run(debug = app.config['DEBUG'], host = '0.0.0.0')